/*
 * @Author: huangtianyang 916072572@qq.com
 * @Date: 2024-01-16 18:57:40
 * @LastEditors: huangtianyang
 * @LastEditTime: 2024-01-17 08:53:52
 * @FilePath: \cxl-driving-training\src\apis\ip\index.ts
 */
import axios from '../../axios/index'

/**
 * 根据ip获取信息
 * @returns
 */
export const ipLocation = (ip: string) => {
    return axios({
        method: 'get',
        url: '/api/system/lbs/manage/ipLocation',
        params: { ip }
    })
}
/**
 * 根据坐标进行地址转换
 * @param lat
 * @param lng
 * @returns
 */
export const reverseGeocoder = (lat: number, lng: number) => {
    return axios({
        method: 'get',
        url: '/api/system/lbs/manage/reverseGeocoder',
        params: { lat, lng }
    })
}
/**
 * 根据地址获取坐标
 * @param address
 * @returns
 */
export const getLocation = (address: string) => {
    return axios({
        method: 'get',
        url: '/api/system/lbs/manage/geocoder',
        params: { address }
    })
}
